#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> //include getcwd()
#define PATHMAX 200

int main(int argc, char *argv[])
{
    char *buf;
    buf = (char *)malloc(PATHMAX);
    getcwd(buf, PATHMAX);
    printf("getcwd: %s\n", buf);
    free(buf);

    return 0;
}
